﻿using System;
using System.ComponentModel.DataAnnotations;
using Xcj.Mes.WholeLine.DataBase.Common;

namespace Xcj.Mes.WholeLine.DataBase.Entity
{
    public class NotGoodEntity : BaseEntity
    {
        // 对应BatchEntity中的ID
        private Int64 _batchID = 0;
        public Int64 BatchID
        {
            get => _batchID;
            set
            {
                _batchID = value;
                RaisePropertyChanged();
            }
        }

        private string _name { get; set; } = string.Empty;
        [Alias("不良名称"), StringLength(64)]
        public string Name
        {
            get => _name;
            set
            {
                _name = value?.Trim();
                RaisePropertyChanged();
            }
        }

        // 不良名称对应的数量
        private int _count { get; set; } = 0;
        [Alias("不良数量"), StringLength(64)]
        public int Count
        {
            get => _count;
            set
            {
                _count = value;
                RaisePropertyChanged();
            }
        }
    }
}
